<%
session.removeAttribute("task");
String tid=request.getParameter("tid")==null?"":request.getParameter("tid");
%>
<jsp:useBean id="task" scope="session"
    class="com.knife.service.GenerateTypeTask"/>
<%
task.setTid(tid);
task.init();
task.setRunning(true); 
new Thread(task).start();
%>